// Copyright (c) 2023 Presto Labs Pte. Ltd.
// Author: tianqiang

#pragma once

#include <memory>

#include "coin2/exchange/base/api_base/grpc/grpc_trade_client.h"
#include "coin2/exchange/base/market/market_exchange_api.h"

namespace coin2::exchange::order {
class OrderConnectionConfig;
}

namespace coin2::exchange::base::order {

class GrpcTradeClientMgr {
 public:
  using GrpcTradeClientPtr =
      std::unique_ptr<coin2::exchange::base::api_base::grpc::GrpcTradeClient>;
  using MarketExchangeApi = coin2::exchange::base::market::MarketExchangeApi;
  using OrderConnectionConfig = coin2::exchange::order::OrderConnectionConfig;

  static bool Enabled(const MarketExchangeApi&);
  static GrpcTradeClientPtr Create(const MarketExchangeApi&, const OrderConnectionConfig&);
};

}  // namespace coin2::exchange::base::order
